package com.egao.common.module.company.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.egao.common.module.company.entity.Attachment;

import java.util.List;

/**
 * 附件表(Attachment)表服务接口
 *
 * @author dl
 * @since 2021-02-22 09:07:15
 */
public interface AttachmentService extends IService<Attachment> {

    /** 
     * 根据业务编号和类型删除附件
     * @param businessId 业务编号
     * @param businessType 业务类型
     * @return 
     */
    void deleteAttach(Integer businessId, Integer businessType);

    /**
     * 根据业务编号和类型查询附件
     * @param businessId 业务编号
     * @param businessType 业务类型
     * @return
     */
    List<Attachment> getAttachByBusinessId(Integer businessId, Integer businessType);
    /**
     * 保存附件
     * @param businessId 业务编号
     * @param businessType 业务类型
     * @param attachments 附件
     * @return
     */
    void saveAttach(List<Attachment> attachments, Integer businessId, Integer businessType);
}